package com.wangzh.nio.print;

import java.io.*;

public class Demo {

    public static void main(String[] args) throws IOException {
        byteTest();
    }

    private static void byteTest() throws FileNotFoundException {
        PrintStream pw = new PrintStream(new File("printByte.txt"));
        pw.println("你好");

        pw.close();
    }
    private static void charTest() throws FileNotFoundException {
        //字符流
        PrintWriter pw = new PrintWriter(new File("print.txt"));
        pw.println("你好");

        pw.close();
    }
}
